package cn.hdu.liang.ch7;

public class DeadLoopClass {
    static {
        if(true) {
            System.out.println(Thread.currentThread() + "初始化 DeadLoopClass 类");
            while(true) {

            }
        }
    }

    public static void main(String[] args) {
        Runnable script = new Runnable() {
            @Override
            public void run() {
                System.out.println(Thread.currentThread() + "开始");
                DeadLoopClass dlc = new DeadLoopClass();
                System.out.println(Thread.currentThread() + "结束");
            }
        };
        Thread t1 = new Thread(script);
        Thread t2 = new Thread(script);
        t1.start();
        t2.start();
    }
}
